<?php
/**
 * PC 默认控件（一般用于综合控件使用）
 * defaultcontroller.php
 * 
 * Create on 
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\common;

class DefaultController extends \haibao\cms\business\control\Base{
	
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){
		$isSpringFes = false;
		$startTime = strtotime("2016-02-03 00:00:00");
		$endTime = strtotime("2016-02-07 20:59:59");
		$nowTime = time();
		if($nowTime > $startTime && $nowTime < $endTime){
			$isSpringFes = true;
		}
		$this->assign('isSpringFes', $isSpringFes);

		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
		$path = $this->generateHtmlPath(__CLASS__);
		$this->generateHtml($path,$content);
		return $this->getHtml($path);
	}
}